import { Component, OnInit } from '@angular/core';

import { QuestionDetail } from './shared/question-detail.model';
import { QuestionDetailService } from './shared/question-detail.service';

@Component({
	selector: 'question-detail',
	templateUrl: 'question-detail.component.html',
	providers: [QuestionDetailService]
})

export class QuestionDetailComponent implements OnInit {
	questionDetail: QuestionDetail[] = [];

	constructor(private questionDetailService: QuestionDetailService) { }

	ngOnInit() {
		this.questionDetailService.getList().subscribe((res) => {
			this.questionDetail = res;
		});
	}
}